PROFIL
Section: System Calls (2)
Updated: 27 January 1988
Index
Return to Main Contents
NAME
profil - execution time profile
SYNOPSIS
profil(buff, bufsiz, offset, scale)
char *buff;
int bufsiz, offset, scale;
DESCRIPTION
profil()
enables run-time execution profiling, and
reserves a buffer for maintaining raw profiling statistics.
buff
points to an area of core of length
bufsiz
(in bytes).
After the call to
profil,
the user's program counter (pc) is examined at each clock tick
(10 milliseconds on Sun-4 systems, 20 milliseconds on Sun-2 and Sun-3 systems);
offset
is subtracted from its value, and the result multiplied by
scale.
If the resulting number corresponds to a word within the buffer,
that word is incremented.
scale
is interpreted as an unsigned, fixed-point fraction with binary point
at the left: 0x10000 gives a 1-to-1 mapping of pc values to words in
buff;
0x8000 maps each pair of instruction words together.
0x2 maps all instructions onto the beginning of
buff
(producing a non-interrupting core clock).
Profiling is turned off by giving a
scale
of 0 or 1. It is rendered ineffective by giving a
bufsiz
of 0. Profiling is turned off when an
execve()
is executed, but remains on in child and parent both after a
fork().
Profiling is turned off if an update in
buff
would cause a memory fault.
RETURN VALUE
A 0, indicating success, is always returned.
SEE ALSO
gprof(1),
getitimer(2),
monitor(3)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 04:51:42 GMT, January 31, 2023